//
//  TLBaseVC.m
//  TLYunCMS
//
//  Created by mac on 16/10/13.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "TLBaseVC.h"
//#import "WZLBadgeImport.h"


@interface TLBaseVC ()

@end

@implementation TLBaseVC

-(UITabBarItem *)tabbarFourth {
    if (!_tabbarFourth) {
        _tabbarFourth =self.tabBarController.tabBar.items[3];
    }
    return _tabbarFourth;
}



- (void)viewDidLoad {
    [super viewDidLoad];
    //设置view延伸 nav tabbar
    self.edgesForExtendedLayout = UIRectEdgeNone;
    [self.view setBackgroundColor:UIColorFormRGB_bg_F7];
//    self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
    
    
    // Do any additional setup after loading the view from its nib.
}

-(void)showCarShopRed {
//    NSMutableArray *array=[[TLUserData shareUserData]arrayCarShop];
//    if (array.count>0) {
//        [self.tabbarFourth showBadgeWithStyle:WBadgeStyleNumber value:array.count animationType:WBadgeAnimTypeNone];
//        self.tabbarFourth.badgeCenterOffset = CGPointMake(-15, 8);
//    }else {
//        [self.tabbarFourth clearBadge];
//    }
}
-(void)popToCarShop {
    self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:3];
}

////自定义一个方法实现
//- (MJRefreshGifHeader *)setRefreshHeaderForTab:(UITableView *)tableView {
//    
//    NSMutableArray *headerImages = [NSMutableArray array];
//    for (int i = 1; i <= 4; i++) {
//        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"topload%d",i]];
//        [headerImages addObject:image];
//    }
//    MJRefreshGifHeader *gifHeader = [MJRefreshGifHeader headerWithRefreshingBlock:^{
//        //下拉刷新要做的操作.
//    }];
//    gifHeader.stateLabel.hidden = YES;
//    gifHeader.lastUpdatedTimeLabel.hidden = YES;
//    
//    [gifHeader setImages:@[headerImages[0]] forState:MJRefreshStateIdle];
//    [gifHeader setImages:headerImages forState:MJRefreshStateRefreshing];
//    tableView.mj_header = gifHeader;
//    
//    return gifHeader;
//}

//- (MJRefreshAutoGifFooter *)setRefreshFooterForTab:(UITableView *)tableView {
//    
//    NSMutableArray *footerImages = [NSMutableArray array];
//    for (int i = 1; i <= 4; i++) {
//        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"footerload%d",i]];
//        [footerImages addObject:image];
//    }
//    //上拉加载
//    MJRefreshAutoGifFooter *gifFooter = [MJRefreshAutoGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(mjRefreshLoadMore)];
//    gifFooter.stateLabel.hidden = YES;
//    gifFooter.refreshingTitleHidden = YES;
//    [gifFooter setImages:@[footerImages[0]] forState:MJRefreshStateIdle];
//    [gifFooter setImages:footerImages forState:MJRefreshStateRefreshing];
//    tableView.mj_footer = gifFooter;
//    return gifFooter;
//}


-(void)mjRefreshReLoad {
    return;
}
-(void)mjRefreshLoadMore {
    return;
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
